﻿<%@ Page Language="C#" MasterPageFile="~/View/Admin/Template.master" AutoEventWireup="true" CodeFile="QuanLyTinTuc.aspx.cs" Inherits="View_Admin_QuanLyTinTuc" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    .style3
    {
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="left" class="style1">
    <tr>
        <td align="left">
            Tiêu Đề</td>
    </tr>
    <tr>
        <td align="left">
            <asp:TextBox ID="txtTieuDe" runat="server" Width="462px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtTieuDe" Display="Dynamic" ErrorMessage="Không được trống" 
                ValidationGroup="a"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td align="left">
            Loại tin tức :
            <asp:DropDownList ID="dropLoaiTT" runat="server" Width="210px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td align="left" class="style3">
            Ngày Đăng :<asp:Label ID="lblNgayDang" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left" class="style3">
            <asp:TextBox ID="txtNoiDung" runat="server" Height="236px" TextMode="MultiLine" 
                Width="465px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtNoiDung" Display="Dynamic" 
                ErrorMessage="Không được trống" ValidationGroup="a"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td class="style3">
            <asp:Button ID="btnDangTin" runat="server" onclick="btnDangTin_Click" 
                Text="Đăng Tin" ValidationGroup="a" />
&nbsp;<asp:Button ID="btnHuy" runat="server" Text="Hủy Bỏ" PostBackUrl="~/TrangChu.aspx" 
                ValidationGroup="a" />
        </td>
    </tr>
    <tr>
        <td class="style3">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style3" align="left" style="font-size: 15pt">
            Các Tin Đã Đăng</td>
    </tr>
    <tr>
        <td class="style3" align="left">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataKeyNames="maloai" onrowcancelingedit="GridView1_RowCancelingEdit" 
                onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                Width="467px" onrowdeleting="GridView1_RowDeleting">
                <Columns>
                    <asp:BoundField DataField="Matt" HeaderText="Mã Tin Tức" />
                    <asp:BoundField DataField="tentt" HeaderText="Tên Tin Tức" />
                    <asp:BoundField DataField="ngaydang" HeaderText="Ngày Đăng" />
                    <asp:TemplateField HeaderText="Loại Tin">
                        <EditItemTemplate>
                            <table align="center" class="style1">
                                <tr>
                                    <td>
                                        <asp:DropDownList ID="DropDownList1" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("tenloai") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField CancelText="Hủy Bỏ" EditText="Sửa" ShowEditButton="True" 
                        UpdateText="Cập Nhật" />
                    <asp:CommandField DeleteText="Xóa" ShowDeleteButton="True" />
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td class="style3" align="left">
            <asp:TextBox ID="txtRead_NoiDung" runat="server" Height="129px" 
                TextMode="MultiLine" Visible="False" Width="471px"></asp:TextBox>
        </td>
    </tr>
</table>
</asp:Content>

